package com.javafm.devices.service.impl;

import com.javafm.devices.dto.Devices;
import com.javafm.devices.service.DevicesService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Service
public class DevicesServiceImpl implements DevicesService {
    @Override
    public List<Devices> getDevicesList(int parkId) {
        // 手工造数据，加装是从数据库查询出来的
        if (parkId == 1001) {
            List<Devices> devicesList = new ArrayList<>();

            Devices devices1 = new Devices();
            devices1.setId(2001);
            devices1.setName("5F-501门口摄像头");
            devicesList.add(devices1);

            return devicesList;
        }
        return Collections.emptyList();
    }
}
